package functions;

public class Sinus extends MoveFunction {
	private int a, b;

	/**
	 * getY(x) does this:
	 *     a * sin(x / b)
	 * @param a
	 * @param b
	 */
	public Sinus(int a, int b){
		this.a = (a==0 ? 1 : a);
		this.b = (b==0 ? 1 : b);
	}
	
	@Override
	public double getY(double x) {
		return (a*Math.sin(x / b));
	}

	@Override
	public Sinus clone() throws CloneNotSupportedException {
		Sinus clone = new Sinus(this.a, this.b);
		this.clone_help(clone);
		
		return clone;
	}
}
